// components/sellerSend/sellerSend.js
const api = require("../../api/api")
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    showSendList:{
      type:Array,
      value:[]
    },
    iid:{
      type:Number,
      value:[]
    },
    show:{
      type:Boolean,
      value:true
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    do(e){ 
      console.log(this.data.showSendList)  
      console.log(e.currentTarget.dataset)
      console.log(e.currentTarget.dataset.id)      
      var goodsid = e.currentTarget.dataset.goodsid //商品id
      var iiid = e.currentTarget.dataset.id   
      var sendList = JSON.stringify(this.data.showSendList)
      wx.request({
        url: api.getGoodsDetail.url,
        method:api.getGoodsDetail.method,
        data:{
          id:goodsid
        },
        success:res=>{
          console.log(res)
        }
      })
      wx.navigateTo({
        url: '../../pages/sureSend/sureSend?goodsid='+goodsid+"&id="+iiid+"&showSendList="+sendList,
      })
    }
  }
})
